package cn.zwx.member.svc.rpc.dto;

import lombok.Data;
import org.apache.dubbo.apidocs.annotations.RequestParam;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * @author zhangwenxue
 */
@Data
public class UpdateAddressDTO {

    /**
     * 主键id
     */
    @NotNull(message = "地址id不能为空")
    @RequestParam(value = "地址id",description = "地址id",required = true)
    private Long id;


    /**
     * 省
     */
    @RequestParam(value = "省份id",description = "省份id")
    private Long provinceId;


    /**
     * 市
     */
    @RequestParam(value = "城市id",description = "城市id")
    private Long cityId;


    /**
     * 县/区
     */
    @RequestParam(value = "区域id",description = "区域id")
    private Long districtId;


    /**
     * 电话
     */
    @Length(min = 11,max = 11,message = "联系人电话必须是11位")
    @RequestParam(value = "联系人电话")
    private String phone;

    /**
     * 详细地址
     */
    @Length(max = 128,message = "详细地址不能超过128位")
    @RequestParam(value = "详细地址")
    private String address;

    /**
     * 联系人
     */
    @Length(max = 32,message = "联系人不能超过32位")
    private String contact;

    /**
     * 是否是默认true-默认 false-是否
     */
    @RequestParam("是否默认地址 true-默认 false-是否")
    private Boolean isDefault;

}
